<?php
	$arrConst =	Efy_Init_Const::_setProjectPublicConst();
	$arrStaffPermission = $_SESSION['arrStaffPermission'];
	$sAdministratorSystem = ""; $sAdministratorSystem1 = "";$sAdministratorSystem2 = "";
	if (isset($arrStaffPermission['CAP_NHAT_DM_DOI_TUONG'])){
		$sAdministratorSystem1 = $arrStaffPermission['CAP_NHAT_DM_DOI_TUONG'];	
	}
	if (isset($arrStaffPermission['CAP_NHAT_LOAI_DM'])){
		$sAdministratorSystem2 = $arrStaffPermission['CAP_NHAT_LOAI_DM'];	
	}
	$sAdministratorSystem = $sAdministratorSystem1 || $sAdministratorSystem2;
	$permisstionSystem	=	($_SESSION['STAFF_PERMISSTION']==Efy_Init_Config::_setPermisstionSystem(1)) || ($_SESSION['STAFF_PERMISSTION']==Efy_Init_Config::_setPermisstionSystem(2));
?>
<ul>
	<!--BAI GIANG-->	
	<?php  
		$urlRe = $this->baseUrl . "../mtl/training/index/";?>
	<li id="header_training" href="<?=$urlRe;?>"  onclick="selectHead('<?=$urlRe;?>','TRAINING','index')" >Quản trị chuyên mục</li>	
	<!--QUAN TRI-->	
	<?php if($sAdministratorSystem || ($permisstionSystem)){		
		$urlRe = $this->baseUrl . "../listxml/listtype/index/";?>
	<li  id ="header_admin" onclick="href('<?=$urlRe;?>')">Quản trị hệ thống</li>
	<?php } ?>
	<li  id ="header_profile" class="settinguser" ><?=$_SESSION['position_name']?></li>	
</ul>

<div class="profileuser normal_label" id="profileuser" style="display:none;"><?= $_SESSION['INFORMATION_STAFF_LOGIN_MTL'] ?></div>
<script type="text/javascript">
	$(document).ready(function($) {
		_readyfunctionload();
    });
	$(document).click(function(e){
	    _clickwindows(e);
	});
	<?php $sCurrentModulCode = $this->currentModulCode;?>
	CurrentModulCode = '<?=$sCurrentModulCode?>';
	setHeaderMenu(CurrentModulCode);	
	function setHeaderMenu(CurrentModulCode){
		$('div#main-header').find('li').removeClass('selected');
		switch(CurrentModulCode){
			case "REMINDER":
				document.getElementById('header_reminder').className="selected";
				break;
			case "TRAINING":
				document.getElementById('header_training').className="selected";
				break;	
			case "SEARCH":
				document.getElementById('header_search').className="selected";
				break;
			case "REPORT":
				document.getElementById('header_report').className="selected";
				break;			
			case "HELP":
				document.getElementById('header_help').className="selected";
				break;			
			case "ADMIN":
				document.getElementById('header_admin').className="selected";
				break;
			default:
				document.getElementById('header_reminder').className="selected";
				break;
		}
	}
	//
	function open_document(){
		window.open("<?php echo $this->baseUrl; ?>huongdansudung/Tai lieu HDSD phan mem QLDL day va hoc.doc")
	}
	//
	function href(url){
		window.location.href = url;
	}
</script>